package com.example.Extension.ApplicationListener;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.event.ApplicationContextEvent;

/**
 * @Description TODO
 * @Date 2024/6/3 13:15
 * @Created by houjunfeng
 */
public class Test {
    @org.junit.Test
    public void test(){
        AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(Configuration.class);
        annotationConfigApplicationContext.publishEvent(new ApplicationEvent(new  String("发布了一个事件")) {
        });
        annotationConfigApplicationContext.close();
    }
}
